/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.spider.entity;

import org.hibernate.validator.constraints.Length;

import com.thinkgem.jeesite.common.persistence.DataEntity;

/**
 * Spider中用到的Site对象的配置Entity
 * @author hongye
 * @version 2017-04-12
 */
public class SiteConfig extends DataEntity<SiteConfig> {
	
	private static final long serialVersionUID = 1L;
	private String userAgentId;		// user_agent外键
	private String retryTimes;		// retry_times
	private String retrySleeptime;		// retry_sleeptime
	private String sleeptime;		// sleeptime
	private String timeout;		// timeout
	
	public SiteConfig() {
		super();
	}

	public SiteConfig(String id){
		super(id);
	}

	@Length(min=1, max=100, message="user_agent外键长度必须介于 1 和 100 之间")
	public String getUserAgentId() {
		return userAgentId;
	}

	public void setUserAgentId(String userAgentId) {
		this.userAgentId = userAgentId;
	}
	
	@Length(min=1, max=5, message="retry_times长度必须介于 1 和 5 之间")
	public String getRetryTimes() {
		return retryTimes;
	}

	public void setRetryTimes(String retryTimes) {
		this.retryTimes = retryTimes;
	}
	
	@Length(min=1, max=5, message="retry_sleeptime长度必须介于 1 和 5 之间")
	public String getRetrySleeptime() {
		return retrySleeptime;
	}

	public void setRetrySleeptime(String retrySleeptime) {
		this.retrySleeptime = retrySleeptime;
	}
	
	@Length(min=1, max=5, message="sleeptime长度必须介于 1 和 5 之间")
	public String getSleeptime() {
		return sleeptime;
	}

	public void setSleeptime(String sleeptime) {
		this.sleeptime = sleeptime;
	}
	
	@Length(min=1, max=5, message="timeout长度必须介于 1 和 5 之间")
	public String getTimeout() {
		return timeout;
	}

	public void setTimeout(String timeout) {
		this.timeout = timeout;
	}
	
}